added most of the framework needed