finishing code