updating code for debugging