cleaning up my functions