compiles and works as expected