Removed unnecessary slope calculation