update for Swift 1.1. Add EV calculations