added basic mtd. Need to fix calculate to get it shippable and testable