update type casting with methods from jQuery