refector code