added singularize method for tablenames and tests