add support to client defined main