Feature/fix keyword parser r0

add back keyword parser
extract that logic into a function