added some new functions
some changes