added sizing checks