improved the scripts and removed unecessary code from notebook