refactored client/server function for new drink