made loadCore into an if statement