updated a few lines of code