add functions etc
rearranging
more functions
more functions
tweak regex