added potential making and Adrian's code