move update method to API interface, add java.lang.Math as static import