added some functions to the statem