enclosed world, formatted a bit, now using a function instead of object program