modified for client