updated script to support installation