minor fix, will come back to it later
expand and substitute to perl regex