new functions and some small changes
message