simplify save code
added TODO