added profiling. do --profile to profile