more progress, but buggy as fuck