started coding functions