added printing of debuging messages in addition to variable splitting
removed debugging messages