rearrange test samples for readability
adding test for issue #6
rename some varnames for readability + comments