put frame_to_net in a sub