Fix is require
Reduce complexity
add datetime support