created remderSort method