beginning of rearanging -- separating data connection