System code for fourth year project