updated style
removed usage of shiftn from parsing function