seperated everything into appropriate classes