moving functions over from backend class