More work on chord, logic still not correct