trying to work out some bugs, please be patient