debug outpu deleted
many parts are replaces on two function