modified functions to take chords
added function to find chords