First version

base function implement