moved more code to framework