compute hit vector