calculator works for the most part