begin fixing function returns