fix for sqrt() of int
added function for monte carlo estimation of q_t