revised function syntax