added debug print for clarity