```layer``` never changes so it should just be ```int layer```.