created function for accepting parameters