all the parameter checkings have been incorporated