some inpruvements
added new functions