moved to a separate class