made some minor modifications