updated for server execution