added panic and did some linting