the re stuff can be moved to core from __init__