some improvements on shadow