using seperate function to eliminate python unique feature