Seems to be working, a few off by one errors..