adding overlay layers functionality