modify unworking code