splitting up Some functions