change remove row to function