implements and closes #32