Implementing magens boilerplate