working on proper regex matching