refactored to scripts folder