changed init and sorting values