Just an exercise based on an earlier program