move manage site function out of main site