added singularize function