minor changes and fixs