adopted rgkit changes