fixed model error, User must be declared after methods