somewhat working
fixed merge conflicts