I don't know what said proper class would be. Feel free to change the code.