fixes on function