all of this is dead code, it wasn't called anymore since it was moved to JS