merged with salah's update and finish up the integration script