started working and testing is last function