implemented V2 lag API, moved some stuff around