Implemented everything crudely