added main function and defined precendence of binary operators