after_initialize callback for plugins
tidy up method