fixed sorting / works in app to current specification (bound to change for part 4)