added function for random projection