Work in progress - program structure enhanced