update install script for more flexible structure