code now compiles (doesn't work yet)