created dog subview and removed unnecessary code