initial coding and testing