cleaned up some function parameters and added some comments