Update function to work on responsive too