added transistor class and functions