imported initial code