refatored classes