simple implementation of metropolis-hastings for course project