i don't like "any" type. i did it this way due to type checking.