Profile script

Added code for profiling