rewrote codebase, implemented example using id