debugged set_level, renamed Port to Pin