added debug print statements -> will be transformed into error codes