boilerplate code and removing unneeded stuff