added layerhits method