Added a calculate button and added it to code