added z-index component to manipulate drawing order