added constructor to calculator