migrate to spring context