added some more controls
refractoring