added end round logic