simplifying some functions