start working on build function