first commit- main functions are all mostly here more soon to come