moving sorting functions to own area in std libs