chande a function
fixing errors
fixing errors