Code problems with transistor