Pranita's updated code