refactored from hash to binary data response in remote_action