move set active code to service js