first version with debug