added input support, finished regex