added cosine distribution