partially refactored twizzer