added a little more to the accoridon function