moving panel creation into methods