working without regex