layer change functionality added