more capture code added