making the code look cleaner
adding new function types
testing all changes since last commit