Function working properly

Need to add more parameters