introduced brain class to encapsualte application logic