adding foreground and background layer