move all extra lib into a specific method