TODO: think again. is this safe?