ugly code should improve