Updated based on PR suggestions