added code for downsampling and randomfaces + src