some debugs removed