errors moved to own class