my work on the functions
merged stuff