implemented a whole bunch of stuff!