implement Arv's code notes