updated regex and other small things