merge of shock code