Added functions to pass parameters to the layouts