realisation of different sort methods