Removing duplicate code, instead use visit(block) to process prefix @Panya