nearly there… at least function wise