adding functionality for supporting layouts..not functioning