how structural directive works