added amendments and master function