generic build/research/upgrade methods

improved build method. how to use is given above the method