minor changes code