adding no-sha option. refactoring input
sort alphabetically