implemented power function and slerp