added checkerboard composition and some code improvements