functions for the baseball app