added logic to actionPanel so everything's not done in the actual panel