Changed to new function for insets