Updated code to new style!