small changes

fixed some functions