blug... this class is so spaghetti