updated for new protocol 1