prepared variables and functions for server