made as function