Filled out some helper functions
merged