implemented handling of shadow