fixed some of the functions

should be working right now