this method should not be here as it is a jQuery-based implementation