added arrows, code cleanup