move everything for drawing side shadow in its own function