move rastierzer controller code to a helper file