added secure flag