Separate Foreground and background