added erb logic