add functions for building, not finished yet