basic code working now. some more features to add at some point