better prescaller implementation