added module for plan datatype + some minor change