adding indexPost method