Complete code from Apul's PC