some minor modifications