adjusted 2014 code for easy execution