reorganize code
toy example of serving binary images from R