separating some functions