somehow this code is better