organized it a bit better in a class