added regex to clean up vars