added more console log calls