Changed load method to use if statements instead of switch