Calculator functions extended