restruct pulse to make it clearer