fixed #5

later version will include sorting by weight
typo