updated with some functions