Updated to general framework