replicate code to test and ref in keywords fix