making apple calculator functional