added TODO listed, modified from bdub