rewrite the code

return a array if element is a checkbox;