made minor modifications