its working now, just need to write tests now