version 3, using sys