added constructor and cleaned up example

:+1: