better setServer function, more dynamic now.