Updated based on suggestions from Tyler