more generic build process