splitting into classes