code for creating an activation network