Updated code for framework