code clean ups (not tested)