fixed pattern matching to not match for whole line