first version of apn implementation