first attempt of setting frequency