added hooks for a better mobile support