improved buildscript