update variable on MainHandler to print profit