finished first cut at calculator implementation