more hacky less buggy