implemented sorting of modules by code or name