Updating code so it doesn't have warnings