improved regexp for  method