adding safe code to send correct stuff