basic calc code
combo of basic and advanced calc codes