moving helpers function