change function names, improve aesthetics