added shadow feature and more simplification