used regular expressions instead