added initial parseParams function