Seperated the concerns to different classes