build the basis and need to write many functions