Added angle calculation