More modularized approach