debugging shortened version 2