improved example of valid code