added createCustomer function, and made code abit cleaner