functionality all there, now fix bugs